package org.datastreamapi.read

import org.FlinkStreamApp
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

/**
 * description ：从文件读取数据
 * author      ：剧情再美终是戏 
 * mail        : 13286520398@163.com
 * date        ：Created in 2020/2/21 19:15
 * modified By ：
 * version:    : 1.0
 */
object ReadTextFile extends FlinkStreamApp{

  override def doSomeThing(environment: StreamExecutionEnvironment) = {
    // 从文件读取数据
    val value = environment.readTextFile("./a.txt", "UTF-8")

    // 打印数据
    value.print()
  }

}
